<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
 lang="en" dir="ltr">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link rel="stylesheet" href="../codebase/default.css" type="text/css" media="screen" title="no title" charset="utf-8"><title>
    dhtmlxdataprocessor:adjusting_server_side_code    [DHX documentation]
  </title></head>

<body>
<div class="dokuwiki">
  
  <div class="stylehead">

    <div class="header">
    <a class="logo" href="http://dhtmlx.com" title="DHTMLX Home Page"></a>
    <span class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</span>

    <div class="search-field">
        <form action="/dhtmlx/docs/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><button type="submit"></button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>    </div>
        <div class="buttons">
                <a class="doc"></a>
                <a title="DHTMLX Samples homepage" href="../samples.html" class="sample"/></a>
        </div>
     <!-- <div class="pagename">
        [[<a href="#"  title="Backlinks">dhtmlxdataprocessor:adjusting_server_side_code</a>]]
      </div>
      <div class="logo">
        <a href="/dhtmlx/docs/doku.php"  name="dokuwiki__top" id="dokuwiki__top" accesskey="h" title="[H]">DHX documentation</a>      </div>

      <div class="clearer"></div>-->
        
    </div>

    
<!--   <div class="bar" id="bar__top">
      <div class="bar-left" id="bar__topleft">
        <form class="button btn_edit" method="post" action="/dhtmlx/docs/doku.php"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="" /><input type="hidden" name="id" value="dhtmlxdataprocessor:adjusting_server_side_code" /><input type="submit" value="Edit this page" class="button" accesskey="e" title="Edit this page [E]" /></div></form>        <form class="button btn_revs" method="get" action="/dhtmlx/docs/doku.php"><div class="no"><input type="hidden" name="do" value="revisions" /><input type="hidden" name="id" value="dhtmlxdataprocessor:adjusting_server_side_code" /><input type="submit" value="Old revisions" class="button" accesskey="o" title="Old revisions [O]" /></div></form>      </div>

      <div class="bar-right" id="bar__topright">
        <form class="button btn_recent" method="get" action="/dhtmlx/docs/doku.php"><div class="no"><input type="hidden" name="do" value="recent" /><input type="hidden" name="id" value="dhtmlxdataprocessor:adjusting_server_side_code" /><input type="submit" value="Recent changes" class="button" accesskey="r" title="Recent changes [R]" /></div></form>        <form action="/dhtmlx/docs/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><button type="submit"></button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>&nbsp;
      </div>

      <div class="clearer"></div>
    </div> -->

<!--        <div class="breadcrumbs">
      <span class="bchead">Trace:</span> <span class="bcsep">&raquo;</span> <span class="curid"><a href="/dhtmlx/docs/doku.php?id=dhtmlxdataprocessor:adjusting_server_side_code"  class="breadcrumbs" title="dhtmlxdataprocessor:adjusting_server_side_code">adjusting_server_side_code</a></span>    </div>
    -->

    
  </div>
  
  
  <div class="page">
    <!-- wikipage start -->
    
<p>
<div class='backlinks'><div class='backlink last_backlink'><img src="icons___file.gif"  class="media" alt="" /><a href="../index.html" class="wikilink1" title="start">Index</a></div><div class='arrow'></div><div class='backlink last_backlink'><img src="icons___dataprocessor.gif"  class="media" alt="" /><a href="index.html" class="wikilink1" title="dhtmlxdataprocessor:toc">dhtmlxdataprocessor</a></div></div>

</p>

<h2><a name="adjusting_server_side_code" id="adjusting_server_side_code">Adjusting Server Side Code</a></h2>
<div class="level2">

<p>

If you are using php-connectors - please refer to connectors documentation.
</p>

<p>
The default package contains an example of the server side code for <acronym title="Hypertext Preprocessor">PHP</acronym> (by additional request the similar code for JSP|ColdFusion|C#.Net|RybyOnRails can be sent).
The code does the following three tasks:
</p>

<p>
a) Takes parameters from the incoming request;<br/>

b) Makes the necessary DB operation;<br/>

c) Returns the information about the operation result.
</p>

<p>
The incoming parameters are:
</p>
<ul>
<li class="level1"><div class="li"> gr_id - id of a row in the grid for which some operation is executed;</div>
</li>
<li class="level1"><div class="li"> !nativeeditor_status - the status of the operation;</div>
</li>
<li class="level1"><div class="li"> inserted - the row in question was added;</div>
</li>
<li class="level1"><div class="li"> deleted - the row in question was deleted;</div>
</li>
<li class="level1"><div class="li"> … any other value … - the row was updated;</div>
</li>
<li class="level1"><div class="li"> c0 - the data of the first column in the updated row;</div>
</li>
<li class="level1"><div class="li"> c1 - the data of the second column in the updated row;<br/>
 ….<br/>
</div>
</li>
<li class="level1"><div class="li"> cN - the data of the (N+1)th column in the grid.</div>
</li>
</ul>

<p>

All the parameters are part of GET request.
</p>

<p>
Based on the value of ”!nativeeditor_status” the related section of the server side logic is triggered.
</p>

<p>
The response must be in the following format:

</p>
<pre class="code javascript">  <span class="sy0">&lt;</span>data<span class="sy0">&gt;</span>
      <span class="sy0">&lt;</span>action type<span class="sy0">=</span><span class="st0">&quot;some&quot;</span> sid<span class="sy0">=</span><span class="st0">&quot;some&quot;</span> tid<span class="sy0">=</span><span class="st0">&quot;some&quot;</span> <span class="sy0">/&gt;</span>
  <span class="sy0">&lt;/</span>data<span class="sy0">&gt;</span></pre>
<p>

Where:
</p>
<ul>
<li class="level1"><div class="li">  type - the type of the operation (it may be “insert”, “update”, “delete”);</div>
</li>
<li class="level1"><div class="li">  sid - the original row ID (the same as gr_id);</div>
</li>
<li class="level1"><div class="li">  tid - the ID of the row after the operation (may be the same as gr_id, or some different one - it can be used during a new row adding, when a temporary ID created on the client side is replaced with the ID taken from the DB or by any other business rule).</div>
</li>
</ul>

<p>

The response must be a valid <acronym title="Extensible Markup Language">XML</acronym> in order to be processed correctly.
</p>

</div>
<div class="secedit"><form class="button btn_secedit" method="post" action="/dhtmlx/docs/doku.php"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="lines" value="62-" /><input type="hidden" name="rev" value="1279031280" /><input type="hidden" name="id" value="dhtmlxdataprocessor:adjusting_server_side_code" /><input type="submit" value="Edit" class="button" title="Adjusting Server Side Code" /></div></form></div>
    <!-- wikipage stop -->
  </div>

  <div class="clearer">&nbsp;</div>

  
  <div class="stylefoot">

    <div class="meta">
      <div class="user">
              </div>
     <!-- <div class="doc">
        dhtmlxdataprocessor/adjusting_server_side_code.txt &middot; Last modified: 2010/07/13 17:28 (external edit)      </div>
    </div>-->

   
    <!--<div class="bar" id="bar__bottom">-->
      <!--<div class="bar-left" id="bar__bottomleft">-->
        <!--<form class="button btn_edit" method="post" action="/dhtmlx/docs/doku.php"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="" /><input type="hidden" name="id" value="dhtmlxdataprocessor:adjusting_server_side_code" /><input type="submit" value="Edit this page" class="button" accesskey="e" title="Edit this page [E]" /></div></form>-->
        <!--<form class="button btn_revs" method="get" action="/dhtmlx/docs/doku.php"><div class="no"><input type="hidden" name="do" value="revisions" /><input type="hidden" name="id" value="dhtmlxdataprocessor:adjusting_server_side_code" /><input type="submit" value="Old revisions" class="button" accesskey="o" title="Old revisions [O]" /></div></form>-->
      <!--</div>-->
      <!--<div class="bar-right" id="bar__bottomright">-->
        <!---->
        <!---->
        <!---->
        <!---->
        <!---->
        <!--<form class="button btn_index" method="get" action="/dhtmlx/docs/doku.php"><div class="no"><input type="hidden" name="do" value="index" /><input type="hidden" name="id" value="dhtmlxdataprocessor:adjusting_server_side_code" /><input type="submit" value="Index" class="button" accesskey="x" title="Index [X]" /></div></form>-->
        <!--<a class="nolink" href="#dokuwiki__top"><input type="button" class="button" value="Back to top" onclick="window.scrollTo(0, 0)" title="Back to top" /></a>&nbsp;-->
      <!--</div>-->
      <!--<div class="clearer"></div>-->
    <!--</div>-->

  </div>

  

</div>

<div class="footerinc">


</div>

<div class="no"><img src="/dhtmlx/docs/lib/exe/indexer.php?id=dhtmlxdataprocessor%3Aadjusting_server_side_code&amp;1279804817" width="1" height="1" alt=""  /></div>
     <div class="footer">
        <div class="footer-logo"></div>
        <div class="copyright">Copyright © 1998-2009 DHTMLX LTD.<br />All rights reserved.</div>
        <form class="button btn_edit" method="post" action="/dhtmlx/docs/doku.php"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="" /><input type="hidden" name="id" value="dhtmlxdataprocessor:adjusting_server_side_code" /><input type="submit" value="Edit this page" class="button" accesskey="e" title="Edit this page [E]" /></div></form>    	    </div>
</body>
</html>
